package cn.bs.allensocket.mythread;

/**
 * Created by Allen on 2014/11/5.
 */
public class NameListTest {
    public static void main(String[] args)
    {
        final NameList nl = new NameList();
        nl.add("ase");
        class NameDroper extends Thread{
            public void run(){
                String res = nl.removeFirst();
                System.out.println(res);
            }
        }
        Thread t1 = new NameDroper();
        Thread t2 = new NameDroper();
        t1.start();
        t2.start();
    }
}
